feat(ha-mirror): V2 room assignment — mirrored HA entities land in their Brilliant rooms - #29
Open
btli wants to merge 4 commits into
Open
feat(ha-mirror): V2 room assignment — mirrored HA entities land in their Brilliant rooms#29btli wants to merge 4 commits into
btli wants to merge 4 commits into
Conversation
…eir Brilliant rooms Map each mirrored entity's HA area (entity area, device-area fallback) to a Brilliant room by case-insensitive name match — ROOM_OVERRIDES takes precedence — and reflect room_assignment on the hosted peripheral so mirrored devices appear under their room on every panel. Unmatched entities stay unassigned (logged once). Live-verified on the pilot: rooms catalog read from home_configuration.rooms via a dedicated read-only RPCObserver connection (the firmware PeripheralHost exposes no registry read); room_assignment reflected via _set_value_internal with the RoomAssignment STRUCT object (a serialized string is rejected by the framework's type validation); catalog fetch failures degrade to skip-this-cycle instead of crashing the supervisor. All five mirrored backyard/balcony lamps verified assigned to their Backyard/Balcony rooms on the bus. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ROOM_OVERRIDEStakes precedence; unmatched entities stay unassigned (logged once).home_configurationperipheral'sroomsvariable via a dedicated read-onlyRPCObserverconnection (the firmwarePeripheralHostexposes no registry-read API — live-verified).room_assignmenton each hosted peripheral via the existing_set_value_internalpath, passing theRoomAssignmentstruct object (the framework's type validation rejects the serialized string form — live-verified).docs/superpowers/research/2026-07-11-ha-mirror-room-assignment.md(corrects the 2026-07-10 note:room_idsentries are catalogRoom.idverbatim — no timestamp to append).Live pilot verification (office.iot)
All five mirrored lamps assigned correctly on the bus after leader election, no supervisor errors:
Zero new required config: the HA areas (Backyard/Balcony) name-match the existing Brilliant rooms.
Gate
uv run ruff check --fix && uv run ruff format && uv run mypy --strict src tests && uv run pytest— 753 passed, 1 skipped (firmware-only), mypy --strict clean. Integration (custom_components/,ha/) untouched.🤖 Generated with Claude Code